<template>
  <div>
    <ul>
     <li v-for="m in msg" :key="m.id">
        <router-link
          :to="{
            //path: '/home/message/detail',
            name: 'xiangqin',
            params: {
              id: m.id,
              title: m.title,
            },
          }"
        >
          {{ m.title }}
        </router-link>
      </li>
      <!-- <li v-for="m in msg" :key="m.id"><router-link :to="`/home/message/detail?id=${m.id}&title=${m.title}`">{{ m.title }}</router-link></li> -->
    </ul>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "Message",
  data() {
    return {
      msg: [
        { id: "001", title: "测试message1" },
        {
          id: "002",
          title: "测试message2",
        },
        {
          id: "003",
          title: "测试message3",
        },
      ],
    };
  },
  methods: {
    pushShow(m) {
      this.$router.push({
        name: "xiangqin",
        query: {
          id: m.id,
          title: m.title,
        },
      });
    },
    // replaceShow() {},
  },

};
</script>

<style>
</style>